package sgd.tp2.api.cmdline;

import sgd.tp2.api.net.NetProtocolType;

import com.beust.jcommander.IStringConverter;

public class NetProtocolTypeConverter implements IStringConverter<NetProtocolType> {

	@Override
	public NetProtocolType convert(String value) {
		return (value.equalsIgnoreCase("udp") ? NetProtocolType.UDP : NetProtocolType.TCP);
	}
}